<div class="refentry" lang="en" xml:lang="en"><a id="glXCreateGLXPixmap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>glXCreateGLXPixmap — create an off-screen GLX rendering area</p></div><div class="refsynopsisdiv"><h2>C Specification</h2><div class="funcsynopsis"><table><tr><td><code class="funcdef">GLXPixmap <b class="fsfunc">glXCreateGLXPixmap</b>(</code></td><td>Display *  </td><td><var class="pdparam">dpy</var>, </td></tr><tr><td> </td><td>XVisualInfo *  </td><td><var class="pdparam">vis</var>, </td></tr><tr><td> </td><td>Pixmap  </td><td><var class="pdparam">pixmap</var><code>)</code>;</td></tr></table></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="parameters"></a><h2>Parameters</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>dpy</code></em></span></dt><dd><p>
                    Specifies the connection to the X server.
                </p></dd><dt><span class="term"><em class="parameter"><code>vis</code></em></span></dt><dd><p>
                    Specifies the visual that defines the structure of the rendering area.
                    It is a pointer to an <code class="constant">XVisualInfo</code> structure,
                    not a visual ID or a pointer to a <code class="constant">Visual</code>.
                </p></dd><dt><span class="term"><em class="parameter"><code>pixmap</code></em></span></dt><dd><p>
                    Specifies the X pixmap that will be used as the front left color buffer
                    of the off-screen rendering area.
                </p></dd></dl></div></div><div class="refsect1" lang="en" xml:lang="en"><a id="description"></a><h2>Description</h2><p>
            <code class="function">glXCreateGLXPixmap</code> creates an off-screen rendering area and returns its XID.
            Any GLX rendering context that was created with respect to <em class="parameter"><code>vis</code></em>
            can be used to render into this off-screen area.
            Use <a class="citerefentry" href="glXMakeCurrent"><span class="citerefentry"><span class="refentrytitle">glXMakeCurrent</span></span></a> to associate the rendering area with a GLX
            rendering context.
        </p><p>
            The X pixmap identified by <em class="parameter"><code>pixmap</code></em> is used as the front left buffer of the
            resulting off-screen rendering area.
            All other buffers specified by <em class="parameter"><code>vis</code></em>,
            including color buffers other than the front left buffer,
            are created without externally visible names.
            GLX pixmaps with double-buffering are supported.
            However, <a class="citerefentry" href="glXSwapBuffers"><span class="citerefentry"><span class="refentrytitle">glXSwapBuffers</span></span></a> is ignored by these pixmaps.
        </p><p>
            Some implementations may not support GLX pixmaps with direct rendering
            contexts.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="notes"></a><h2>Notes</h2><p>
            <code class="constant">XVisualInfo</code> is defined in <span class="emphasis"><em>Xutil.h.</em></span>
            It is a structure that includes <span class="emphasis"><em>visual</em></span>, <span class="emphasis"><em>visualID</em></span>, <span class="emphasis"><em>screen</em></span>, and
            <span class="emphasis"><em>depth</em></span> elements.
        </p></div><div class="refsect1" lang="en" xml:lang="en"><a id="errors"></a><h2>Errors</h2><p>
            <code class="constant">BadMatch</code> is generated if the depth of <em class="parameter"><code>pixmap</code></em> does not match
            the depth value reported by core X11 for <em class="parameter"><code>vis</code></em>,
            or if <em class="parameter"><code>pixmap</code></em> was not created with respect to the same screen as <em class="parameter"><code>vis</code></em>.
        </p><p>
            <code class="constant">BadValue</code> is generated
            if <em class="parameter"><code>vis</code></em> is not a valid XVisualInfo pointer (for example, if a
            particular GLX implementation does not support this visual).
        </p><p>
            <code class="constant">BadPixmap</code> is generated if <em class="parameter"><code>pixmap</code></em> is not a valid pixmap.
        </p><p>
            <code class="constant">BadAlloc</code> is generated if the server cannot allocate the GLX
            pixmap.
        </p></div>
        {$pipelinestall}{$examples}
        <div class="refsect1" lang="en" xml:lang="en"><a id="seealso"></a><h2>See Also</h2><p>
            <a class="citerefentry" href="glXCreateContext"><span class="citerefentry"><span class="refentrytitle">glXCreateContext</span></span></a>,
            <a class="citerefentry" href="glXCreatePixmap"><span class="citerefentry"><span class="refentrytitle">glXCreatePixmap</span></span></a>,
            <a class="citerefentry" href="glXDestroyGLXPixmap"><span class="citerefentry"><span class="refentrytitle">glXDestroyGLXPixmap</span></span></a>,
            <a class="citerefentry" href="glXIsDirect"><span class="citerefentry"><span class="refentrytitle">glXIsDirect</span></span></a>,
            <a class="citerefentry" href="glXMakeCurrent"><span class="citerefentry"><span class="refentrytitle">glXMakeCurrent</span></span></a>
        </p></div><div class="refsect1" lang="en" xml:lang="en"><div id="Copyright"><h2>Copyright</h2><p>
            Copyright © 1991-2006
            Silicon Graphics, Inc. This document is licensed under the SGI
            Free Software B License. For details, see
            <a class="ulink" href="https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/" target="_top">https://web.archive.org/web/20171022161616/http://oss.sgi.com/projects/FreeB/</a>.
        </p></div></div></div>
